package cn.icanci.loopstack.ddk.common.socket.trigger;

import cn.icanci.loopstack.ddk.common.socket.publish.PublishMethodInvokeDTO;

import java.util.Objects;
import java.util.StringJoiner;

/**
 * 通知更新
 * 
 * @author icanci
 * @since 1.0 Created in 2023/01/12 08:41
 */
public class MethodInvokeTriggerDTO extends TriggerDTO {
    /**
     * 需要更新的通知配置
     */
    private PublishMethodInvokeDTO methodInvoke;

    public PublishMethodInvokeDTO getMethodInvoke() {
        return methodInvoke;
    }

    public void setMethodInvoke(PublishMethodInvokeDTO methodInvoke) {
        this.methodInvoke = methodInvoke;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        MethodInvokeTriggerDTO that = (MethodInvokeTriggerDTO) o;
        return Objects.equals(methodInvoke, that.methodInvoke);
    }

    @Override
    public int hashCode() {
        return Objects.hash(methodInvoke);
    }

    @Override
    public String toString() {
        return new StringJoiner(",").add("methodInvoke=" + methodInvoke).toString();
    }
}
